package com.xiyun.admin.client;

import com.xiyun.common.response.result.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod",fallback = VodFeignClient.class)
@Component
public interface VodClient {
    //定义调用的方法路径
    @ApiOperation("根据视频id删除视频")
    @DeleteMapping("/xiyun/vod/video/delVideo/{videoId}")
    R delVideoInfo(@PathVariable("videoId") String videoId);

    //定义调用删除多个云端视频的方法
    @ApiOperation("删除多个云端视频")
    @DeleteMapping("/xiyun/vod/video/deleteVideos")
    R deleteVideosBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
